home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / May 96 / Re CW9 68k & ODF R1? < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  2.0 KB  |  [TEXT/ttxt]

  1. Subject:     Re: CW9 68k & ODF R1?
  2. Sent:        5/21/96 7:21 AM
  3. Received:    5/22/96 8:32 AM
  4. From:        Henri Lamiraux, lamiraux@apple.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >>3. Has anybody had similar bus error as me? Has anybody fugured out what is
  9. >>the cause of the bus error, and how to fix it?
  10. >> I've found out that bus error happened in this calling sequence:
  11. >>
  12. >>CNothingFrame::Draw
  13. >>FW_CGraphicContext::InitGraphicContext
  14. >>FW_PrivGC_Initialize
  15. >>FW_FailOnEvError
  16. >>FW_GetEvError
  17. >
  18. >This was a problem with PowerPC vs 68K alignment. Previous compiler had a 
  19. >problem with "#pragma align=xxx" statement.
  20.  
  21.  
  22. My answer to this question was misleading. The bug with "#pragma 
  23. align=xxx" in previous CW 68K compiler was hidding a bug in ODF. The 
  24. compiler shipping with CW9 fixes this problem revealing the ODF bug. This 
  25. is an easy problem to fix. Open the file FWEnvDef.h in 
  26. ODF:Found:FWCommon:Include:. Look for the following lines (in the #ifdef 
  27. __MWERKS__ block) :
  28.  
  29.     #define FW_FOUR_BYTE_INTS __fourbyteints__
  30.  
  31.     // Force PowerPC alignment
  32.     #pragma options align=power
  33.  
  34. //=========================================================================
  35. ===============
  36. // Symantec C++ -- Macintosh
  37. //=========================================================================
  38. ===============
  39. #elif defined SYMANTEC_CPLUS && !defined _WINDOWS
  40.  
  41.  
  42. Replace them with:
  43.  
  44.  
  45.     #define FW_FOUR_BYTE_INTS __fourbyteints__
  46.  
  47.     // Force PowerPC alignment
  48.     #ifndef FW_BUILD_MAC68K
  49.         #pragma options align=power
  50.     #endif
  51.     
  52. //=========================================================================
  53. ===============
  54. // Symantec C++ -- Macintosh
  55. //=========================================================================
  56. ===============
  57. #elif defined SYMANTEC_CPLUS && !defined _WINDOWS
  58.  
  59.  
  60. This problem doesn't affect the ODF Shared library because it was built 
  61. with the Symantec C++ for MPW. After changing those lines rebuilt all 
  62. static libraries and samples.
  63.